<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var emp='{"id":1,"name":"张"}';
    var emp1={"id":1,"name":"张"};
    console.log(emp);
    console.log(emp1);

    console.log(JSON.parse(emp));
    console.log(JSON.stringify(emp1));
</script>
123
</body>
</html>